/**
 * Copyright (c) 2012, SHX Studio.
 * All rights reserved.
 * rosary226@gmail.com
 * 
 * @author shenqianfeng
 * @date 2012-9-3 下午09:53:28   
 * @version 1.0   
 */

package com.xxx.sqfengine.util;

/**
 * @author shenqianfeng
 */
public class SQFGLCompareUtil {
	public static boolean isEqual(float a, float b) {
		double exp = 10E-10;
		if (Math.abs(a - b) > -1 * exp && Math.abs(a - b)<exp){
			return true;
		}
		return false;
	}
	
	
	public static boolean isEqualZero(float val) {
		return SQFGLCompareUtil.isEqual(val , 0.0f);
	}
	
	public static boolean isEqualOne(float val) {
		return SQFGLCompareUtil.isEqual(val , 1.0f);
	}
}
